import myaxios from "../MyAxios";

import URLENV from "@/http/BaseUrl";
const BMDURL = URLENV.BMDURL;

const movieThumbApi = {
  /**
   * 添加申请表接口
   * @param {Object} params 详见接口文档
   */
  add(params) {
    return myaxios.post(BMDURL + "apply/add", params);
  },

  /**
   * 查询相应用户id下的所有剧照
   * @param {Object} params 详见接口文档
   */
  listByUserId(params) {
    return myaxios.get(BMDURL + "apply/user", params);
  },

  /**
   * 删除相应ID的剧照
   * @param {Object} params  {id:1}
   */
  delete(params) {
    return myaxios.post(BMDURL + "apply/del", params);
  },

  // 查找所有申请表
  queryApplyList() {
    let url = BMDURL + "apply";
    return myaxios.get(url);
  },

  /**
   *模糊查询:通过昵称关键字查询演员列表
   * @param {object} params 参数列表 {name:名}
   */
  queryApplyByNameLike(params) {
    let url = BMDURL + "apply/name";
    return myaxios.post(url, params);
  },

  /**
   * 查询相应申请id下的所有剧照
   * @param {Object} params 详见接口文档
   */
  listByApplyId(params) {
    return myaxios.get(BMDURL + "apply/applyid", params);
  },
};

export default movieThumbApi;
